﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


/// <summary>
/// 攻击方向及数量属性
/// </summary>
public class AttackDir
{
    public int forward = 0;
    public int back = 0;
    public int left = 0;
    public int rigt = 0;

    public static AttackDir operator +(AttackDir data1, AttackDir data2)
    {
        AttackDir data = new AttackDir();
        
        data.forward = data1.forward + data2.forward;
        data.back = data1.back + data2.back;
        data.left = data1.left + data2.left;
        data.rigt = data1.rigt + data2.rigt;

        return data;
    }

    public static AttackDir operator -(AttackDir data1, AttackDir data2)
    {
        AttackDir data = new AttackDir();

        data.forward = data1.forward + data2.forward;
        data.back = data1.back - data2.back;
        data.left = data1.left - data2.left;
        data.rigt = data1.rigt - data2.rigt;

        return data;
    }
}

